/*CSS para la barra de navegacion*/

.topnav:after {
  content: "";
  clear: both;
  display: table;
}

.topnav {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  width: 100%;
  z-index: 998;
  background: linear-gradient(to right, rgba(76, 83, 103, 0.9), rgba(52, 57, 75, 0.9));
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(5px); /* Soporte para Safari en iOS */
  backdrop-filter: blur(5px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
  background-color: #ffffff;
  width: 100px;
  margin: 0 2%;
  padding: 0;
  float: left;
}

.logo img {
  max-width: 100%;
  margin: 0 auto;
}

.icon {
  margin: 25px 0;
  margin-right: 20px;
  border: 1px solid #ffffff;
  border-radius: 5px;
  font-size: 24px;
  background-color: inherit;
  color: #FFFFFF;
  cursor: pointer;
  display: none;
  transition: transform 0.3s ease, color 0.3s ease;
}
.icon:hover{
  border: 1px solid #ccb370;
  color:  #ccb370;
}
@media screen and (max-width:800px){
  .icon{
    margin: 20px 0;
    margin-right: 10px;
  }
}

.topnav a {
  float: left;
  display: block;
  color: #FFFFFF;
  text-align: center;
  padding: 34px 15px;
  text-decoration: none;
  font-size: 16px;
}
@media screen and (max-width:800px){
  .topnav a {
    color: #FFFFFF;
    padding: 24px 15px;
  }
}

.dropdown {
  float: left;
  position: relative;
}

.dropdown .dropbtn {
  font-size: 16px;
  font-weight: 10;
  border: none;
  outline: none;
  color: #FFFFFF;
  padding: 34px 15px;
  background-color: inherit;
  margin: 0;
}

@media screen and (max-width:800px){
  .dropdown .dropbtn {
    color: #FFFFFF;
  }
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 0px); /* Posicionar el dropdown debajo del botón */
  left: 0;
  background-color:  #FFFFFF;
  min-width: 100%;
  border-bottom: 2px solid #ccb370;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1; /* Asegurar que el dropdown esté por encima de otros elementos */
}

@media screen and (max-width:800px){
  .dropdown-content {
    background-color: inherit;
    border-top: 2px solid #ccb370;
  }
}
/* Ajustar la posición del dropdown al hacer hover */

.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content a {
  width: 100%;
  color: #1a1a1a;
  padding: 15px 10px;
  text-decoration: none;
  border-radius: none;
  display: block;
  text-align: center;
}

.topnav a:hover,
.dropdown:hover .dropbtn {
  background-color: #7b819b;
  transition: background-color 0.5s ease;
  color: #ccb370;
}

.dropdown-content a:hover {
  background-color:#9094a3;
  transition: background-color 0.5s ease;
  color: #FFFFFF;
}

@media screen and (max-width: 800px){
.dropdown-content a {
  color: #FFFFFF;
} 
.dropdown-content a:hover {
  color: #1a1a1a;
}
}
  
/*Estilo del button en la barra de navegacion*/

button.save{
  animation: wiggle 3s linear infinite;
}

/* Keyframes */
@keyframes wiggle {
  0%, 7% {
    transform: rotateZ(0);
  }
  15% {
    transform: rotateZ(-10deg);
  }
  20% {
    transform: rotateZ(5deg);
  }
  25% {
    transform: rotateZ(-5deg);
  }
  30% {
    transform: rotateZ(3deg);
  }
  35% {
    transform: rotateZ(-2deg);
  }
  40%, 100% {
    transform: rotateZ(0);
  }
}

button.save{
  cursor: pointer;
  position: absolute;
  left: calc(90% - 3em);
  top: calc(50% - 2em);
  height: 4em;
  width: 7em;
  background: #9094a3;
  border: none;
  border-top: 3px solid  #ccb370;
  border-radius: 0 0 0.2em 0.2em;
  color: #FFFFFF;
  font-size: 1em;
  transform-origin: 50% 5em;
  transition: transform 0.3s ease, color 0.3s ease;
}
button.save:hover{
  color:#ccb370;
}

/*@media para la barra de navigacion*/

@media screen and (max-width: 800px) {
  .logo{
    padding: 0;
    width: 80px;
    height: 0;
  }
  button.save{
    width: 4.5em;
    height: 3em;
  /*  left: calc(90% - 17.5em);
*/
    top: calc(50% - 1.5em);
    left: 0;
    margin-left: 2%;
  }
  .topnav a:not(:first-child),
  .dropdown .dropbtn .save{
    position: sticky;
    top: 0;
    left: 0;
    display: none;
  }
  .topnav a .icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 800px) {
  .topnav.responsive {
    position: relative;
  }
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}

@media screen and (max-width: 800px) {
  .topnav a:not(:first-child), .dropdown .dropbtn {
    display: none;
  }

  .topnav .icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 800px) {
  .topnav.responsive {position: sticky;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }

  .topnav.responsive a {
    float: none;
    display: block;
    text-align: center;
  }

  .logo {
    display: block;
    float: none;
    margin: 0 auto;
  }

  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: center;
  }
  .topnav.responsive .dropdown.first-dropdown .dropbtn {
    margin-top: 70px;
}
  .dropdown .dropbtn {
    padding: 24px 15px;
  }
  .dropdown-content a{
    opacity: 0.8;
    padding: 15px 10px;
  }
}